home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun: Strategy Games 2
/
rerun-strategygamesII.d64
/
symbol code
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
6KB
|
211 lines
2 printchr$(147)"would you like instructions (y/n)?
4 [161] a$: [139] a$[179][177] "y" [175] a$[179][177]"n" [167] 4
6 [139] a$[178]"n" [167] 90
8 [153]"instructions on screen or printer (s/p)?
10 get b$: if b$<> "s" and b$<>"p" then 10
12 if b$="s"then d=3
14 if b$="p" then d=4
16 open d,d
18 print#d,"
20 [152]d,"symbol code by evangelos petroutsos
22 print#d,"run it right: c-64
24 [152]d,"
26 print#d,"symbol code, an adaptation of master-
28 [152]d,"mind, you must guess a sequence of four
30 print#d,"symbols from a set of six. columns 1-4
32 [152]d,"in the grid hold your guesses; columns
34 print#d,"fg and ps are number of symbols you
36 [152]d,"have correct and the number of those
38 print#d,"correct which are correctly placed.
40 [152]d,"
42 print#d,"use f1 or f7 to point the arrow at the
44 [152]d,"one you want, then press 1, 2, 3 or 4
46 print#d,"for a square. if you change your mind,
48 [152]d,"redo the steps. it's ok to repeat
50 print#d,"symbols.":if d=4 then 62
52 print#d,"
54 [153]"press a key to continue"
56 [161] dd$:[139] dd$[178]"" [167] 56
58 [152]d,"
60 print#d,"
62 [152]d,"
64 print#d,"press the spacebar and the program
66 [152]d,"will compare your guess to the hidden
68 print#d,"code and show the results. for help,
70 [152]d,"press h and one symbol of the code will
72 print#d,"appear in the special squares in the
74 [152]d,"lower right.
76 print#d,"
78 [152]d,"you start with 500 points. break the
80 print#d,"code in two guesses and you keep them
82 [152]d,"all. further guesses and help cost 10
84 print#d,"and 50 points, respectively. press any
86 [152]d,"f key to play again.
88 print#d,"":closed
90 print"press any key to begin the program..."
92 get e$:if e$="" then 92
94 clr
96 rem *************************
98 rem *** symbol code *** *** ***
100 rem *** copyright 1982 ***
102 rem *** evang. petroutsos ***
104 rem *************************
106 rem
108 rem ** "" cursor down
110 rem ** "" cursor right
112 rem ** "" cursor home
114 rem ** "[147]" clear screen
116 rem ** "[144]" control-black
118 rem
120 l=1137:print"[144]":poke53281,13
122 dd=1268:ef=0:rv=0:sc=500
124 restore:fori=1to6:forj=1to4:reada%(i,j):next:next
126 ef=0:form=1 to 4
128 d(m)=int(rnd(3)*6)+1:ifd(m)>6then128
130 ifm=1then136
132 fori=1tom-1:ifd(m)=d(m-i)then128
134 next
136 next
138 rem ** the subroutines at lines:
140 rem ** 1000, 1200, 1300
142 rem ** draw the grid and the symbols193 rem ** on the screen
144 gosub324:gosub380:gosub372
146 gosub180
148 print"score:";sc;"[146]";"average:";v9;"[146]"
150 getr$:ifr$=""then150
152 ifr$="[133]"then170:rem f1 function key
154 ifr$="[136]"then174:rem f7 function key
156 ifr$=" "then242
158 ifr$="1"thensd=dd:a1=1:goto222
160 ifr$="2"thensd=dd+3:a2=1:goto222
162 ifr$="3"thensd=dd+6:a3=1:goto222
164 ifr$="4"thensd=dd+9:a4=1:goto222
166 ifr$="h"thensc=sc-50:goto200
168 goto148
170 l1=l:l=l-120:ifl<1137thenl=1737
172 goto176
174 l1=l:l=l+120:ifl>1737thenl=1137
176 gosub372
178 goto148
180 rem ** hidden code **
182 poke1930,102:poke1931,102:poke1933,102:poke1934,102:poke1936,102
184 poke1937,102:poke1939,102:poke1940,102
186 poke1970,102:poke1971,102:poke1973,102:poke1974,102:poke1976,102
188 poke1977,102:poke1979,102:poke1980,102
190 print"hidden code";
192 print"[176][192][192][192][192][192][192][192][192][192][192][192][174]"
194 print"[221][221]"
196 print"[221][221]"
198 print"[173][192][192][192][192][192][192][192][192][192][192][192][189]";:print"":return
200 rem *** help ***
202 ifrv=0then q1=1930:goto210
204 ifrv=1then q1=1933:goto210
206 ifrv=2then q1=1936:goto210
208 q1=1939
210 rv=rv+1:f1=d(rv)
212 pokeq1,a%(f1,1):pokeq1+1,a%(f1,2):pokeq1+40,a%(f1,3):pokeq1+41,a%(f1,4)
214 ifr$="h"andrv=4thensc=0:goto312
216 ifrv=4then 320
218 ifgg=9thenreturn
220 goto148
222 rem*** draw a figure ***
224 ifl=1137thenfg=1:goto236
226 ifl=1257thenfg=2:goto236
228 ifl=1377thenfg=3:goto236
230 ifl=1497thenfg=4:goto236
232 ifl=1617thenfg=5:goto236
234 ifl=1737thenfg=6:goto236
236 pokesd,a%(fg,1):pokesd+1,a%(fg,2):pokesd+40,a%(fg,3):pokesd+41,a%(fg,4)
238 r=val(r$):b(r)=fg
240 goto148
242 ifa1=0ora2=0ora3=0ora4=0then148
244 f=0:p=0
246 a1=0:a2=0:a3=0:a4=0:ef=ef+1
248 fori1=1to4:ifb(i1)=d(i1)thenp=p+1
250 next
252 form=1 to 4:for k=1to4:
254 fors=1tom-1:if b(m)=b(m-s)thens=m-1:k=4:goto262
256 nexts
258 ifb(m)=d(k)thenf=f+1
260 nextk
262 nextm
264 ifp<4thengosub400
266 ifp=4thendd=dd+120
268 rem *** check guess ***
270 ifef>2thensc=sc-10
272 dr=dd-120:if f=0then300
274 ifdd=1268thendr=1868
276 pokedr+14,81:
278 if f=1then290
280 pokedr+55,81
282 iff=2then290
284 pokedr+15,81
286 iff=3then290
288 pokedr+54,81:
290 ifp=0then148
292 pokedr+17,81:ifp=1then148
294 pokedr+58,81:ifp=2then148
296 pokedr+18,81:ifp=3then148
298 pokedr+57,81
300 ifp<4then148
302 rem *** correct guess ***
304 print"":print"gongratulations !!!";
306 gm=gm+1:sc=sc+10:d9=sc-vg:vg=vg+d9/gm:v9=int(vg)
308 remprint"";"score:";sc;"[146]";"average:";v9;"[146]"
310 gg=9:rv=0:gosub200:rv=1:gosub200:rv=2:gosub200:rv=3:gosub200:gg=0
312 sc=0:gm=gm+1:d9=sc-vg:vg=vg+d9/gm:v9=int(vg)
314 print" ";
316 print"";"score:";sc;"[146]";"average:";v9;"[146]";" "
318 sc=500:ef=0
320 getf$:iff$<>"[133]"andf$<>"[134]"andf$<>"[135]"andf$<>"[136]"then320
322 print"[147]":gg=0:f=0:p=0:dd=1268:l=1137:rv=0:goto120
324 print"[147]"
326 print"[176][192][192][192][192][192][192][192][192][192][192][192][174] [176][192][192][178][192][192][174] "
328 print"[194]your choice[194] [194]fg[194]ps[194] "
330 print"[173][192][192][192][192][192][192][192][192][192][192][192][189] [173][192][192][177][192][192][189] "
332 print"[176][192][192][178][192][192][178][192][192][178][192][192][174] [176][192][192][178][192][192][174] "
334 print"[221] [221] [221] [221] [221] [221] [221] [221] "
336 print"[221] [221][160] [221] [221] [221] [221] [221] [221] "
338 print"[171][192][192][219][192][192][219][192][192][219][192][192][179] [171][192][192][219][192][192][179] "
340 print"[221] [221] [221] [221] [221] [221] [221] [221] "
342 print"[221] [221] [221] [221] [221] [221] [221][160] [221] "
344 print"[171][192][192][219][192][192][219][192][192][219][192][192][179] [171][192][192][219][192][192][179] "
346 print"[221] [221] [221] [221] [221] [221] [221] [221] "
348 print"[221] [221] [221] [221] [221] [221] [221][160] [221] "
350 print"[171][192][192][219][192][192][219][192][192][219][192][192][179] [171][192][192][219][192][192][179] "
352 print"[221] [221] [221] [221] [221] [221] [221] [221] "
354 print"[221] [221] [221] [221] [221] [221] [221][160] [221] "
356 print"[171][192][192][219][192][192][219][192][192][219][192][192][179] [171][192][192][219][192][192][179] "
358 print"[221] [221] [221] [221] [221] [221] [221] [221] "
360 print"[221] [221] [221] [221] [221] [221] [221][160] [221] "
362 print"[171][192][192][219][192][192][219][192][192][219][192][192][179] [171][192][192][219][192][192][179] "
364 print"[221] [221] [221] [221] [221] [221] [221] [221] "
366 print"[221] [221] [221] [221] [221] [221] [221][160] [221] "
368 print"[173][192][192][177][192][192][177][192][192][177][192][192][189] [173][192][192][177][192][192][189] "
370 return
372 pokel1,32:pokel1+1,32:pokel1+2,32
374 pokel1+40,32:pokel1+41,32:pokel1+42,32
376 pokel,233:pokel+1,111:pokel+2,111
378 pokel+40,95:pokel+41,119:pokel+42,119:return
380 poke1134,160:poke1135,160:poke1174,160:poke1175,160
382 poke1254,233:poke1255,223
384 poke1294,95:poke1295,105
386 poke1374,77:poke1375,78:pok